import { request } from '@/utils/request'
import type { Swiper, Menu, Goods } from '@/types/home'

// 获取首页轮播图数据
export const getSwipers = () => {
  return request<Swiper[]>({
    url: 'banner/list'
  })
}

// 获取首页菜单数据
export const getMenus = () => {
  return request<Menu[]>({
    url: 'menu/list'
  })
}

// 分页获取商品列表数据
export const getGoodsList = (count = 1, limitNum = 10) => {
  return request<Goods[]>({
    url: 'pro/list',
    data: {
      count,
      limitNum
    }
  })
}
